<?php

return [
	'accounts' => function() {return _elgg_services()->accounts; },
	'config' => function() {return _elgg_services()->config; },
	'csrf' => function() {return _elgg_services()->csrf; },
	'db' => function() {return _elgg_services()->publicDb; },
	'events' => function() {return _elgg_services()->events; },
	'fields' => function() {return _elgg_services()->fields; },
	'gatekeeper' => function() {return _elgg_services()->gatekeeper; },
	'group_tools' => function() {return _elgg_services()->group_tools; },
	'html_formatter' => function() {return _elgg_services()->html_formatter; },
	'locale' => function() {return _elgg_services()->locale; },
	'logger' => function() {return _elgg_services()->logger; },
	'menus' => function() {return _elgg_services()->menus; },
	'mimetype' => function() {return _elgg_services()->mimetype; },
	'session' => function() {return _elgg_services()->session; },
	'session_manager' => function() {return _elgg_services()->session_manager; },
	'system_messages' => function() {return _elgg_services()->system_messages; },
	'table_columns' => function() {return _elgg_services()->table_columns; },
	'thread_preloader' => \DI\autowire(\Elgg\Comments\ThreadPreloaderService::class),
	'translator' => function() {return _elgg_services()->translator; },

	// map classes to alias to allow autowiring
	\Elgg\Users\Accounts::class => DI\get('accounts'),
	\Elgg\Comments\ThreadPreloaderService::class => DI\get('thread_preloader'),
	\Elgg\Config::class => DI\get('config'),
	\Elgg\Security\Csrf::class => DI\get('csrf'),
	\Elgg\Application\Database::class => DI\get('db'),
	\Elgg\EventsService::class => DI\get('events'),
	\Elgg\Forms\FieldsService::class => DI\get('fields'),
	\Elgg\Gatekeeper::class => DI\get('gatekeeper'),
	\Elgg\Groups\Tools::class => DI\get('group_tools'),
	\Elgg\Views\HtmlFormatter::class => DI\get('html_formatter'),
	\Elgg\I18n\LocaleService::class => DI\get('locale'),
	\Elgg\Logger::class => DI\get('logger'),
	\Elgg\Menu\Service::class => DI\get('menus'),
	\Elgg\Filesystem\MimeTypeService::class => DI\get('mimetype'),
	\ElggSession::class => DI\get('session'),
	\Elgg\SessionManagerService::class => DI\get('session_manager'),
	\Elgg\SystemMessagesService::class => DI\get('system_messages'),
	\Elgg\Views\TableColumn\ColumnFactory::class => DI\get('table_columns'),
	\Elgg\I18n\Translator::class => DI\get('translator'),
];
